package com.mz361.modules.system.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mz361.common.enums.StatusEnum;
import com.mz361.common.utils.StatusUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.Where;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author niceale
 * @date 2024/07/23
 */
@Data
@Entity
@Table(name = "std_invoiceTitle")
@EntityListeners(AuditingEntityListener.class)
@Where(clause = StatusUtil.NOT_DELETE)
public class InvoiceTitle implements Serializable {
    // 主键ID
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    // 主键ID
    @ApiModelProperty(notes = "主键ID")
    private Long id;
    // 抬头
    @ApiModelProperty(notes = "抬头")
    private String title;
    // 抬头类型，0:个人/事业单位，1:企业
    @ApiModelProperty(notes = "抬头类型")
    private String titleType;
    // 发票类型，0:普票，1:专票
    @ApiModelProperty(notes = "发票类型")
    private String invoiceType;
    // 税号
    @ApiModelProperty(notes = "税号")
    private String taxNumber;
    // 开户行
    @ApiModelProperty(notes = "开户行")
    private String depositBank;
    // 银行账号
    @ApiModelProperty(notes = "银行账号")
    private String bankAccount;
    // 地址
    @ApiModelProperty(notes = "地址")
    private String address;
    // 电话
    @ApiModelProperty(notes = "电话")
    private String phone;
    // 邮箱
    @ApiModelProperty(notes = "邮箱")
    private String email;
    // 是否默认
    @ApiModelProperty(notes = "是否默认")
    private Boolean isDefault;
    // 备注
    @ApiModelProperty(notes = "备注")
    private String remark;
    // 创建人
    @JsonIgnore
    private String memeberId;
    // 创建时间
    @CreatedDate
    private Date createDate;
    // 更新时间
    @LastModifiedDate
    private Date updateDate;
    // 数据状态
    @JsonIgnore
    private Byte status = StatusEnum.OK.getCode();
}